﻿using Ev.Answer.Properties;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Media;
using System.Text;
using System.Windows.Forms;

namespace Ev.Answer
{
    public partial class StartForm : Form
    {
        MP3Player mm3 = new MP3Player();
        public StartForm()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            mm3.FilePath = StaticData.soundMain;
            mm3.Play();
        }


        public void showAnswer()
        {
            AnswerForm af = new AnswerForm();
            af.sIndexType = 1;
            mm3.Stop();
            af.ShowDialog();
        }
        

        private void 题库设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Setting ss = new Setting();
            ss.ShowDialog();
            mm3.Play();
        }

        private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void StartForm_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode >= Keys.F1 && e.KeyCode <= Keys.F3)
            {
                showAnswer();
            }
        }

        private void Panel1_Click(object sender, EventArgs e)
        {
            showAnswer();
        }
    }
}
